module.exports = {
    // outputDir: '../template',
    // assetsDir: '../../../static/task/admin',
    productionSourceMap: process.env.NODE_ENV === 'production',
    devServer: {
        proxy: {
            // '/workbenchadmin': {
            //     target: 'http://anjian.iyumweb.com',
            //     ws: false,
            //     changeOrigin: true
            // },
            '/workbenchadmin': {
                target: 'http://project_first.lo.trac.cn',
                ws: false,
                changeOrigin: true
            },
            '/worldcup': {
                target: 'http://test.migucloud.com/vi0',
                ws: false,
                changeOrigin: true
            },
            '/wd_r4': {
                target: 'http://test.migucloud.com/vi0',
                ws: false,
                changeOrigin: true
            }
        }
    },
    chainWebpack: config => {
        if (process.env.NODE_ENV === 'production') {
            // 为生产环境修改配置...
            config.plugin('html').tap(args => {
                args[0].title = 'APP'
                args[0].filename = 'vod.index.html'
                args[0].minify = {
                    collapseWhitespace: false,
                    removeComments: false,
                    removeRedundantAttributes: false,
                    removeScriptTypeAttributes: false,
                    removeStyleLinkTypeAttributes: false,
                    useShortDoctype: false
                }
                return args
            })
        } else {
            // 为开发环境修改配置...
        }
    }
}
